package com.loan.controller;
import com.jfinal.core.Controller;
import com.jfinal.plugin.activerecord.Page;
import com.loan.model.Data;
import com.loan.model.Logger;
import com.loan.service.LoggerService;
import com.loan.util.Json;

public class LoggerController extends Controller {
	private static LoggerService log = new LoggerService();

	/**
	 *  获取列表
	@RequiresRoles("admin")
	 */
	public void list() {
		int page = getParaToInt("page",1);
		int size = getParaToInt("size",10);
		Page<Logger> p = log.list(page, size, Data.flat(getParaMap()));
		renderJson(Json.ok("数据获取成功！", Data.put("page",p)));
	}
}
 